package com.guaju.yueshangLife.bean;

import android.databinding.BaseObservable;
import android.databinding.BindingAdapter;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.guaju.yueshangLife.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by guaju on 2018/9/29.
 */

public class Goods extends BaseObservable {
    String icon;
    String title;
    List<TagsBean> tag;
    String price;
    String id;




    public String getIcon() {
        return icon;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Goods(String icon, String title, List<TagsBean> tag, String price, String id) {
        this.icon = icon;
        this.title = title;
        this.tag = tag;
        this.price = price;
        this.id = id;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<TagsBean> getTag() {
        return tag;
    }

    public void setTag(List<TagsBean> tag) {
        this.tag = tag;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
    @BindingAdapter("app:img")
    public static void  setImg(ImageView iv,String url){
        Glide.with(iv.getContext()).load(url).error(R.mipmap.goods).into(iv);
    }
}
